//
//  YZLCollectionModel.m
//  Car
//
//  Created by dllo on 15/11/9.
//  Copyright © 2015年 岳明. All rights reserved.
//

#import "YZLCollectionModel.h"

@implementation YZLCollectionModel

//归档
- (void)encodeWithCoder:(NSCoder *)aCoder {
    
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.nID forKey:@"id"];
    [aCoder encodeObject:self.image forKey:@"image"];
    [aCoder encodeObject:self.price forKey:@"price"];
    
}

//反归档
- (id)initWithCoder:(NSCoder *)aDecoder {
    
    self = [super init];
    if (self) {
        
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.image = [aDecoder decodeObjectForKey:@"image"];
        self.nID = [aDecoder decodeObjectForKey:@"id"];
        self.price = [aDecoder decodeObjectForKey:@"price"];
    }
    
    return self;
}

@end
